Change roles of modes and functions in image-mode.el (Bug#5062).
authorJuri Linkov <juri@jurta.org>
Fri, 4 Dec 2009 21:43:07 +0000 (21:43 +0000)
committerJuri Linkov <juri@jurta.org>
Fri, 4 Dec 2009 21:43:07 +0000 (21:43 +0000)
commit057d3ede693a19e4efac7bb5b365986247af2fe2
treef7204ff2802aee398d081ff2b2e222fcbea397d1
parent9df60b1bdf0c5b8493330c2636ef166aaf5d35b0
Change roles of modes and functions in image-mode.el (Bug#5062).

* image-mode.el: Replace `image-mode-maybe' with `image-mode'
in `auto-mode-alist'.
(image-mode-previous-major-mode): New variable.
(image-minor-mode-map): Rename from `image-mode-text-map'.
(image-mode): Move graceful error-handling code from
`image-minor-mode' to here.  On errors call `image-mode-as-text'.
(image-minor-mode): Remove all image-handling code.
Replace `image-mode-text-map' with `image-minor-mode-map'.
Check for `image-type' in mode-line format string.
(image-mode-maybe): Make obsolete with an alias to `image-mode'.
(image-mode-as-text): New function with most code from
`image-mode-maybe'.
(image-toggle-display-text): Move code that removes image
properties from `image-toggle-display' to here.
(image-toggle-display-image): New function with code that adds
image properties copied from `image-toggle-display'.
(image-toggle-display): Remove most code with leaving only code
that toggles between `image-mode-as-text' and `image-mode'.
etc/NEWS
lisp/ChangeLog
lisp/image-mode.el